package com.mazaiting.classfile.attr.info;

import com.mazaiting.classfile.ClassReader;
import com.mazaiting.classfile.constant.ConstantPool;

/**
 * 源码调试扩展属性
 *
 * @author mazaiting
 * @since 2021/8/13
 */
public class SourceDebugExtensionAttribute extends AttributeInfo{
    /**
     * 调试扩展属性数组 无符号 u1
     * 长度为 length 值
     */
    private final short[] debugExtension;

    public SourceDebugExtensionAttribute(ConstantPool pool, int index, int length) {
        super(pool, index, length);
        this.debugExtension = new short[length];
    }

    @Override
    public void readInfo(ClassReader reader) {
        for (int i = 0; i < length; i++) {
            this.debugExtension[i] = reader.readU1ToUnsignedByte();
        }
    }
}


















